package com.cltech.service.sys.impl;

import com.cltech.entity.sys.SysExceptionLog;
import com.cltech.frame.base.impl.BaseServiceImpl;
import com.cltech.repository.sys.SysExceptionLogRepository;
import com.cltech.service.sys.SysExceptionLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * Created by Administrator on 2019/3/18.
 */
@Service("sysExceptionLogService")
public class SysExceptionLogServiceImpl extends BaseServiceImpl<SysExceptionLog, String> implements SysExceptionLogService {
    private SysExceptionLogRepository sysExceptionLogRepository;
    @Autowired
    public void setSysUserRepository(SysExceptionLogRepository sysExceptionLogRepository) {
        this.sysExceptionLogRepository = sysExceptionLogRepository;
        super.setBaseRepository(sysExceptionLogRepository);
    }

    @Async("logExecutor")
    @Override
    public void asyncSave(SysExceptionLog sysExceptionLog) {
        sysExceptionLogRepository.save(sysExceptionLog);
    }
}
